<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>兴升阳新品发布 壕礼大放送</title>
    <meta name="description" content=",中国自行车在线">
    <meta name="keywords" content="">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta name="format-detection" content="address=no">
    <link rel="stylesheet" href="source/plugin/zhibo/static/common.css">
    <link href="source/plugin/zhibo/static/Live.css" rel="stylesheet">
    <!--<link rel="stylesheet" href="http://www.olbike.com/source/plugin/dzapp_zhibo/static/js/skin/layer.css"-->
          <!--id="layui_layer_skinlayercss">-->
</head>
<body>
<style>
    .tab-wrap a {
        width: 33.33%;
    }
</style>

<div class="zhibo_info">
    <h1>兴升阳新品发布 壕礼大放送 </h1>
    <span>直播时间 2016-10-11 09:00 至 2016-10-11 15:00</span>
</div>
<a href="http://www.olbike.com/app/huanjing.htm">
    <div class="marquee">
        <marquee>直播结束精彩回放</marquee>
    </div>
</a>

<div class="burl cl">
    <div id="id_video_container_9896587163619714678" style="width:100%;height:1px;"></div>
    <script src="http://qzonestyle.gtimg.cn/open/qcloud/video/live/h5/live_connect.js" charset="utf-8"></script>
    <script type="text/javascript">
        (function () {
            var option = {
                "channel_id": "9896587163619714678",
                "app_id": "1251022106",
                "width": "1024",
                "height": "768"
            };
            new qcVideo.Player(
                    /*代码中的id_video_container将会作为播放器放置的容器使用,可自行替换*/
                    "id_video_container_9896587163619714678",
                    option
            );
        })()
    </script>
</div>
<div class="cl"></div>
<div class="tab-wrap">
    <a id="one2" onclick="setTab('one',2,3)" href="javascript:void(0)" class="">送礼留言</a>
    <a id="one1" onclick="setTab('one',1,3)" class="active" href="javascript:void(0)">车友聊天</a>
    <a id="one3" onclick="setTab('one',3,3)" href="javascript:void(0)" class="">节目介绍</a>
</div>
<div id="con_one_1" class="pannel pinglun hover" style="display: block;">
    <div class="comment-top">
        <a href="javascript:void(0)" data-praise="7">
            <img src="source/plugin/zhibo/static/image/zan.png">
            <em>1646</em>
        </a>

        <div id="postcomment" style="width:75%">
            <textarea id="content" maxlength="50" class="cs_textarea" placeholder="在此输入您的评论"> </textarea>
            <!--<button  ">确定</button>-->
            <div class="b_btn" onclick="add()">发送</div>
        </div>
    </div>
    <div class="gift_list">
        <div class="close" data-gift-close="gift_button"></div>
        <form id="payform" class="payselect" action="plugin.php?id=dzapp_zhibo&amp;mod=view&amp;identify=7"
              method="post">
            <input type="hidden" name="formhash" id="formhash" value="6c4dff8c">
            <input type="hidden" name="paysubmit" value="yes">
            <input type="hidden" id="gift_id" name="gift_id">
            <input type="hidden" name="identify" id="identify" value="7">
            <ul>
                <li data-gift="7"><img src="data/attachment/portal/201609/30/000859rlpqlldp2mpdprip.png">

                    <div class="name">水壶</div>
                    <div class="price">RMB:1.00</div>
                </li>
                <li data-gift="5"><img src="data/attachment/portal/201609/28/170906f0havrx3mx57rdma.png">

                    <div class="name">工具箱</div>
                    <div class="price">RMB:3.00</div>
                </li>
                <li data-gift="6"><img src="data/attachment/portal/201609/30/001131eihn61b1h6zybl8l.png">

                    <div class="name">骑行服</div>
                    <div class="price">RMB:6.00</div>
                </li>
                <li data-gift="8"><img src="data/attachment/portal/201609/30/001746oxlmvmgiwml20qii.png">

                    <div class="name">头盔</div>
                    <div class="price">RMB:8.00</div>
                </li>
                <li data-gift="2"><img src="data/attachment/portal/201609/28/170654mtk799nk8w4x4enq.png">

                    <div class="name">套件</div>
                    <div class="price">RMB:10.00</div>
                </li>
                <li data-gift="3"><img src="data/attachment/portal/201609/28/170726ktt2tgsglx0lizts.png">

                    <div class="name">轮组</div>
                    <div class="price">RMB:12.00</div>
                </li>
                <li data-gift="4"><img src="data/attachment/portal/201609/28/170758j4qbqcmfqmcasfyc.png">

                    <div class="name">车架</div>
                    <div class="price">RMB:15.00</div>
                </li>
                <li data-gift="1"><img src="data/attachment/portal/201609/28/170021dj58njkalj5lbyjl.png">

                    <div class="name">整车</div>
                    <div class="price">RMB:20.00</div>
                </li>
            </ul>
        </form>
    </div>
    <div class="newpl">
        <ul class="ajaxnewcomment">
            <div class="sender" data-comment-id="1"><div><img src="https://id.olbike.com/member/avatar.php?uid=1&amp;size=small"></div><div class="mingzi">admin</div><div class="borderStyle senderType3"><div class="left_triangle"></div><span class="ziti">阿斯达撒的</span></div></div>
        </ul>
        <!--<div class="load-more" style="text-align: center;"><a class="next-page-link" href="javascript:void(0)">点击加载更多</a></div>-->
    </div>
</div>

<div id="con_one_2" class="pannel content" style="display: none;">
    <div class="newp2">
        <ul class="ajaxnewgraphic">
            <div class="sender">
                <div>
                    <img  src="https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2711866059,3317378062&fm=58">
                </div>
                <div class="mingzi">
                    酸的西瓜 送了 <span class="liwu">3个水壶</span>
                </div>
                <div class="senderType3New">
                    <span class="ziti2"> hello, man! hello, man!hello, man!hello, man!hello, man!</span>
                </div>
                <div class="shijian">
                    <span>1分钟前</span>
                </div>
                <hr class="hr">
            </div>
            <div class="sender">
                <div>
                    <img  src="https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2711866059,3317378062&fm=58">
                </div>
                <div class="mingzi">
                    酸的西瓜 送了 <span class="liwu">3个水壶</span>
                </div>
                <div class="senderType3New">
                    <span class="ziti2"> hello, man! hello, man!hello, man!hello, man!hello, man!</span>
                </div>
                <div class="shijian">
                    <span>1分钟前</span>
                </div>
                <hr class="hr">
            </div>
            <div class="sender">
                <div>
                    <img  src="https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=2711866059,3317378062&fm=58">
                </div>
                <div class="mingzi">
                    酸的西瓜 送了 <span class="liwu">3个水壶</span>
                </div>
                <div class="senderType3New">
                    <span class="ziti2"> hello, man! hello, man!hello, man!hello, man!hello, man!</span>
                </div>
                <div class="shijian">
                    <span>1分钟前</span>
                </div>
                <hr class="hr">
            </div>
        </ul>
        <!--<div class="load-more" style="text-align: center;"><a class="more" href="javascript:void(0);">&#45;&#45;加载结束&#45;&#45;</a></div>-->
    </div>
</div>

<div id="con_one_3" class="pannel content" style="display: none;">
    <div class="newpl">
        中国自行车在线目前与多家国内外知名品牌达成合作,为中国自行车玩家提供专业,广阔的互动交流平台.合作联系:0571-58237654
    </div>
</div>

<!--<div id="post_comment" class="post hide">-->
    <!--<div class="post-content">-->
        <!--<div>-->
            <!--<textarea id="content" placeholder="在此输入您的评论"></textarea>-->
            <!--<button id="postClose" class="btn close" type="button">取消</button>-->
            <!--<button class="btn" onclick="add()">确定</button>-->
        <!--</div>-->
    <!--</div>-->
<!--</div>-->

<!--<form action="plugin.php?id=zhibo&mod=ajax&ac=comment" method="post">-->

<!--条: <input type="text" name="name" />-->
<!--<input type="submit">-->
<!--</form>-->


<div id="post_graphic" class="post hide">
    <div class="post-content">
        <div>
            <form id="upload_graphic_form" name="upload_graphic_form"
                  action="plugin.php?id=dzapp_zhibo&amp;mod=ajax&amp;ac=upload" method="POST" target="exec_target"
                  enctype="multipart/form-data">
                <input type="hidden" name="activity_id" value="7">
                <input type="hidden" name="formhash" id="formhash" value="6c4dff8c">
                <input type="hidden" name="graphicsubmit" value="yes">

                <div id="file_area">
                    <input type="file" name="pic" id="pic" style="margin:8px;">
                    <button id="gsubmit" type="submit" style="display:none"></button>
                </div>
            </form>
            <textarea id="describe" placeholder="在此输入描述"></textarea>
            <input type="hidden" id="pic_url" value="">
            <button class="btn close" type="button">取消</button>
            <button class="btn" onclick="upload_graphic()" id="submit" type="submit">确定</button>
        </div>
    </div>
</div>
<button id="tj">tj</button>
<iframe id="exec_target" name="exec_target" style="display:none"></iframe>
<!--source/plugin/zhibo/static/image/zan.png-->
<script src="source/plugin/zhibo/static/js/jquery.js" type="text/javascript"></script>
<!--<script src="http://www.olbike.com/source/plugin/dzapp_zhibo/static/js/layer.js" type="text/javascript"></script>-->
<script>
    var page = 1, gpage = 1;
//    contentlist();

    $(document).ready(function () {
        $('[data-praise]').click(function () {
            var obj = $(this).find('em');
            $.ajax({
                url: 'plugin.php?id=dzapp_zhibo&mod=ajax&ac=praise',
                dataType: 'json',
                data: {activity_id: $(this).attr('data-praise'), formhash: '6c4dff8c'},
                beforeSend: function () {
                    obj.html(parseInt(obj.html()) + 1);
                },
                success: function (data, status) {

                }
            })
        });

        $('[data-gift-close]').click(function () {
            if ($('.gift_list').hasClass('cur')) {
                $('.gift_list').removeClass('cur');
            } else {
                $('.gift_list').addClass('cur');
            }
        });

        $("#postcomment").click(function () {
            var isLogin = '55642';
            if (parseInt(isLogin) > 0) {

                $("#post_comment").removeClass("hide");
                document.getElementById("content").value = "";
                document.getElementById("content").placeholder = "在此输入您的评论";

            } else {
                location.href = 'member.php?mod=logging&action=login';
            }
        });
        $("#post_pic").click(function () {
            $("#post_graphic").removeClass("hide");
        });
        $(".close").click(function () {
            $(".post").addClass("hide");
        });

        $('#con_one_1').on('click', '.next-page-link', function () {
            contentlist();
        });
        $('#one2').click(function () {
            graphiclist();
        });
        $('#con_one_2').on('click', '.next-page-link', function () {
            graphiclist();
        });

        $(document).on('change', '#pic', function () {
            $('#pic_url').val('');
            $('#gsubmit').click();
        })
        $("#exec_target").load(function () {
            var data = $(window.frames['exec_target'].document.body).html();

            if (data != null) {
                $("#pic_url").val(data);
                $("#pic").val('');
            }
        });
    });

    function upload_graphic() {
        if (!$('#pic_url').val()) {
            alert("请上传图片！");
            return false;
        }
        $.ajax({
            url: 'plugin.php?id=dzapp_zhibo&mod=ajax&ac=save',
            dataType: 'json',
            data: {pic: $('#pic_url').val(), describe: $('#describe').val(), activity_id: 7, formhash: '6c4dff8c'},
            async: false,
            success: function (data, status) {
                $(".post").addClass("hide");
                if (data != '0') {
                    var str = "<li class=\"pic-item cl\">";
                    str += "<div class=\"user cl\">";
                    str += "<span class=\"user-pic\">" + data.avatar + "</span>";
                    str += "<span class=\"time\">" + data.username + "<i>" + data.dateline + "</i></span>";
                    str += "</div>";
                    str += "<div class=\"describe\">" + data.describe + "</div>";
                    str += "<img src=\"" + data.pic + "\">";
                    str += "</li>";
                    $('.ajaxnewgraphic').prepend(str);
                }
            },
            error: function (data, status, e) {
                alert(e);
            }
        })
    }

    function tips(id, msg) {
        layer.tips(msg, id, {
            tips: [1, '#3595CC'],
            time: 3000
        });
    }

//    $(function(){
//       $("#tj").click(function(){
//           var zid = $(".ajaxnewcomment div:last-child").attr('data-comment-id');
//       alert(zid);
//       }) ;
//    });

    //添加评论
    function add() {
        var content = $("#content").val();
        if (content.trim() == '') {
            document.getElementById("content").placeholder = "请输入评论";
            return;
        }
        $.ajax({
            type: "POST",
            url: "plugin.php?id=zhibo",
            data: "mod=ajax&ac=add_comment&channelId={$data}&content=" + content,
            dataType: "json",
            success: function (data) {
                if (data) {
                    var str = '<div class=\"sender\" data-comment-id='+data.id+'>';
                    str += '<div><img src="https://id.olbike.com/member/avatar.php?uid=' + data.uid + '&size=small"></div>';
                    str += '<div class=\"mingzi\">'+data.username+'</div>';
                    str += "<div class='borderStyle senderType3'>";
                    str += '<div class=\"left_triangle\"></div>';
                    str += '<span class="ziti">'+ data.content+'</span>';
                    str += "</div>";
                    str += "</div>";

                    //评论每次向头部提交
                    $('.ajaxnewcomment').append(str);
                } else {
                    alert("添加失败！");
                }
                $(".post").addClass("hide");
            }
        });
    }


    function reloadpage(){
            contentlist();
    }

    //更新评论内容
    setInterval("getnewcomment()", 3000);
    function getnewcomment() {
        var zid = $(".ajaxnewcomment .sender:last-child").attr('data-comment-id');
        $.ajax({
            type: "POST",
            url: "plugin.php?id=zhibo",
            data: 'mod=ajax&ac=comment&identify={$data}&zid='+zid,
            dateType: "json",
            success: function (list) {
                var obj =$.parseJSON(list);
                if (obj.length > 0) {
                    for (var i = 0; i < obj.length; i++) {
                        var str = "<div class=\"sender\" data-comment-id=\"" + obj[i].id + "\">";
                        str += '<div><img src="https://id.olbike.com/member/avatar.php?uid=' + obj[i].uid + '&size=small"></div>';
                        str += '<div class=\"mingzi\">'+obj[i].username+'</div>';
                        str += "<div class='borderStyle senderType3'>";
                        str += '<div class=\"left_triangle\"></div>';
                        str += '<span class="ziti">'+ obj[i].content+'</span>';
                        str += "</div>";
                        str += "</div>";

                        $(".ajaxnewcomment").append(str);
                    }
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert(XMLHttpRequest.status);
                alert(XMLHttpRequest.readyState);
                alert(textStatus);
            },
        });
    }

    //内容列表
    function contentlist() {
        $.ajax({
            type: "POST",
            url: "plugin.php?id=zhibo",
            data: "mod=ajax&ac=comment&identify={$data}",
            dataType: "json",
            success: function (list) {
//                console.log(list);
                var content = $(".ajaxnewcomment");
                if (list.length > 0) {
                    for (var i = 0; i < list.length; i++) {
                        var str = "<div class=\"sender\" data-comment-id=\"" + list[i].id + "\">";
                        str += '<div><img src="https://id.olbike.com/member/avatar.php?uid=' + list[i].uid + '&size=small"></div>';
                        str += '<div class=\"mingzi\">'+list[i].username+'</div>';
                        str += "<div class='borderStyle senderType3'>";
                        str += '<div class=\"left_triangle\"></div>';
                        str += '<span class="ziti">'+ list[i].content+'</span>';
                        str += "</div>";
                        str += "</div>";

                        content.append(str);
                    }
                    page++;
//                    if (list.length < 10)
//                        content.parent().find('.load-more').html('<a class="more" href="javascript:void(0);">--加载结束--</a>');
//                } else {
//                    content.parent().find('.load-more').html('<a class="more" href="javascript:void(0);">--加载结束--</a>');
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert(XMLHttpRequest.status);
                alert(XMLHttpRequest.readyState);
                alert(textStatus);
            },
        });
    }

    //礼物列表
    function graphiclist() {
        $.ajax({
            type: "POST",
            url: "plugin.php?id=dzapp_zhibo",
            data: "mod=ajax&ac=graphic&identify=7&page=" + gpage,
            dataType: "json",
            success: function (list) {
                //送礼列表
                var content = $(".ajaxnewgraphic"), str = '';
                if (list.length > 0) {
                    for (var i = 0; i < list.length; i++) {
                        str = "<li class=\"pic-item cl\">";
                        str += "<div class=\"user cl\">";
                        str += "<span class=\"user-pic\">" + list[i].avatar + "</span>";
                        str += "<span class=\"time\">" + list[i].username + "<i>" + list[i].dateline + "</i></span>";
                        str += "</div>";
                        str += "<div class=\"describe\">" + list[i].describe + "</div>";
                        str += "<img src=\"" + list[i].pic + "\">";
                        str += "</li>";
                        content.append(str);
                    }
                    gpage++;
                    if (list.length < 10)
                        content.parent().find('.load-more').html('<a class="more" href="javascript:void(0);">--加载结束--</a>');
                } else {
                    content.parent().find('.load-more').html('<a class="more" href="javascript:void(0);">--加载结束--</a>');
                }
            }
        });
    }
    f=function (id) {
        return (typeof (id)=='object')?id:document.getElementById(id);
    };

    function setTab(name, cursel, n) {
        for (i = 1; i <= n; i++) {
            var menu = document.getElementById(name + i);
            var con = document.getElementById("con_" + name + "_" + i);
            menu.className = i == cursel ? "active" : "";
            con.style.display = i == cursel ? "block" : "none";
        }
    }

</script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
</body>
</html>